@odx/ui 1.0.0-rc.20 → 1.0.0-rc.22

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": "1.0.0-rc.20",
3
+ "version": "1.0.0-rc.22",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "files": [
@@ -14,7 +14,7 @@ $breakpoints: (
14
14
  @return map.keys($breakpoints);
15
15
  }
16
16
 
17
- @function _get-value($breakpoint) {
17
+ @function get-breakpoint-value($breakpoint) {
18
18
  @if $breakpoint and not map.has-key($breakpoints, $breakpoint) {
19
19
  @error "Invalid breakpoint, `#{$breakpoint}` doesn't exist.";
20
20
  }
@@ -34,13 +34,13 @@ $breakpoints: (
34
34
  }
35
35
 
36
36
  @function _get-min-value($breakpoint) {
37
- $value: _get-value($breakpoint);
37
+ $value: get-breakpoint-value($breakpoint);
38
38
 
39
39
  @return if($value != 0, $value, null);
40
40
  }
41
41
 
42
42
  @function _get-max-value($breakpoint) {
43
- $value: _get-value($breakpoint);
43
+ $value: get-breakpoint-value($breakpoint);
44
44
 
45
45
  @return if($value > 0, $value - 1, null);
46
46
  }
@@ -7,7 +7,7 @@
7
7
  pointer-events: none;
8
8
  position: absolute;
9
9
  transform-origin: 0 0;
10
- z-index: 0;
10
+ z-index: var(--odx-v-layer-1);
11
11
 
12
12
  &--horizontal {
13
13
  left: 0;
@@ -9,7 +9,7 @@
9
9
 
10
10
  display: block;
11
11
  position: fixed;
12
- z-index: 1337;
12
+ z-index: var(--odx-v-layer-3);
13
13
 
14
14
  &.is-hidden {
15
15
  opacity: 0;
@@ -32,5 +32,5 @@
32
32
  position: fixed;
33
33
  transform: rotate(45deg);
34
34
  width: dimensions.get-size(0.5);
35
- z-index: 0;
35
+ z-index: var(--odx-v-layer-1);
36
36
  }
@@ -59,6 +59,6 @@
59
59
  position: absolute;
60
60
  top: 0;
61
61
  width: 100%;
62
- z-index: 2;
62
+ z-index: var(--odx-v-layer-1);
63
63
  }
64
64
  }
@@ -1,4 +1,6 @@
1
+ @use 'sass:map';
1
2
  @use 'sass:math';
3
+ @use '../abstract/breakpoints';
2
4
  @use '../abstract/dimensions';
3
5
  @use '../abstract/motion';
4
6
  @use '../abstract/typography';
@@ -47,6 +49,22 @@
47
49
  @include dimensions.margin-x(-2 * $icon-margin);
48
50
  }
49
51
 
52
+ &[data-breakpoint]:has(> .odx-icon, > .odx-avatar) {
53
+ min-width: dimensions.get-size(1.5);
54
+ }
55
+
56
+ @each $breakpoint in breakpoints.get-breakpoint-names() {
57
+ @include breakpoints.down($breakpoint) {
58
+ &[data-breakpoint='#{$breakpoint}'] {
59
+ font-size: 0;
60
+
61
+ > .odx-icon {
62
+ @include dimensions.margin-x(-$icon-margin);
63
+ }
64
+ }
65
+ }
66
+ }
67
+
50
68
  &--highlight:focus-visible {
51
69
  outline-color: var(--blue-400);
52
70
  }
@@ -0,0 +1,172 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/breakpoints';
3
+ @use '../abstract/dimensions';
4
+ @use '../abstract/motion';
5
+ @use '../abstract/typography';
6
+ @use '../abstract/utils';
7
+
8
+ .odx-card {
9
+ $root: &;
10
+ $main-padding: dimensions.get-size(math.div(12, 24));
11
+
12
+ @include motion.transition(box-shadow outline-color, color);
13
+ @include utils.interactive(false);
14
+ @include utils.with-outline-bold();
15
+
16
+ background-color: var(--odx-c-background-content);
17
+ behavior: button;
18
+ border-radius: var(--odx-v-border-radius);
19
+ display: block;
20
+ padding: $main-padding;
21
+ position: relative;
22
+
23
+ &.is-disabled * {
24
+ color: var(--odx-c-text-disabled);
25
+ }
26
+
27
+ &__container {
28
+ display: flex;
29
+ gap: $main-padding;
30
+
31
+ #{$root}--default & {
32
+ flex-direction: column;
33
+ }
34
+
35
+ @include breakpoints.up(phone) {
36
+ #{$root}--launch-tile-centered & {
37
+ flex-direction: column;
38
+ }
39
+ }
40
+ }
41
+
42
+ &__content {
43
+ padding-right: dimensions.get-size(math.div(40, 24));
44
+ }
45
+
46
+ &--default {
47
+ #{$root}__title {
48
+ line-height: dimensions.get-size(math.div(36, 24));
49
+ padding-right: dimensions.get-size(math.div(36, 24));
50
+
51
+ @include typography.font-weight(medium);
52
+ }
53
+ }
54
+
55
+ &:focus-visible,
56
+ &:hover,
57
+ &:focus-within:has(:focus-visible) {
58
+ box-shadow: var(--odx-v-box-shadow-layer-1);
59
+ }
60
+
61
+ &--launch-tile,
62
+ &--launch-tile-centered {
63
+ #{$root}__container {
64
+ @include dimensions.padding-y(0.5);
65
+ @include dimensions.padding-x(math.div(8, 24));
66
+
67
+ gap: dimensions.get-size(math.div(16, 24));
68
+
69
+ @include breakpoints.up(phone) {
70
+ @include dimensions.padding(1, bottom);
71
+
72
+ gap: dimensions.get-size(1);
73
+ }
74
+ }
75
+
76
+ .odx-avatar {
77
+ @include dimensions.container(math.div(64, 24));
78
+ @include dimensions.margin-y(math.div(4, 24));
79
+
80
+ flex: 0 0 auto;
81
+
82
+ @include breakpoints.up(phone) {
83
+ @include dimensions.container(math.div(128, 24));
84
+
85
+ margin: dimensions.get-size(math.div(4, 24)) auto 0;
86
+ }
87
+ }
88
+
89
+ #{$root}__title {
90
+ @include typography.font-weight(medium);
91
+
92
+ display: block;
93
+ font-size: dimensions.get-size(math.div(20, 24));
94
+ line-height: dimensions.get-size(math.div(30, 24));
95
+
96
+ @include breakpoints.up(phone) {
97
+ @include dimensions.margin-y(math.div(9, 24));
98
+
99
+ font-size: dimensions.get-size(math.div(25, 24));
100
+ }
101
+ }
102
+
103
+ #{$root}__subtitle {
104
+ display: block;
105
+ }
106
+
107
+ #{$root}__content {
108
+ flex: 1;
109
+ }
110
+ }
111
+
112
+ @include breakpoints.up(phone) {
113
+ &__content {
114
+ padding-right: unset;
115
+ }
116
+
117
+ &__title,
118
+ &__subtitle {
119
+ #{$root}--launch-tile-centered & {
120
+ text-align: center;
121
+ }
122
+ }
123
+
124
+ &__container {
125
+ padding-right: unset;
126
+
127
+ #{$root}--launch-tile & {
128
+ @include dimensions.padding-y(1);
129
+ }
130
+ #{$root}--launch-tile-centered & {
131
+ gap: dimensions.get-size(math.div(16, 24));
132
+ }
133
+ }
134
+ }
135
+
136
+ &__footer {
137
+ display: flex;
138
+ gap: dimensions.get-size(math.div(12, 24));
139
+ justify-content: flex-end;
140
+
141
+ #{$root}--default & {
142
+ display: block;
143
+ margin-top: $main-padding;
144
+ }
145
+
146
+ @include breakpoints.up(phone) {
147
+ #{$root}--launch-tile-centered & {
148
+ justify-content: center;
149
+ }
150
+
151
+ padding-bottom: dimensions.get-size(math.div(12, 24));
152
+ }
153
+
154
+ .odx-button {
155
+ margin: 0;
156
+ }
157
+ }
158
+
159
+ .odx-card-menu {
160
+ margin: 0;
161
+ position: absolute;
162
+ right: $main-padding;
163
+ top: $main-padding;
164
+ }
165
+
166
+ &.is-disabled {
167
+ .odx-avatar {
168
+ color: var(--odx-c-text-disabled);
169
+ filter: saturate(0);
170
+ }
171
+ }
172
+ }
@@ -0,0 +1,66 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/motion';
3
+ @use '../abstract/dimensions';
4
+
5
+ .odx-expandable-list-item {
6
+ $root: &;
7
+
8
+ position: relative;
9
+
10
+ &::before {
11
+ @include motion.transition(border-color);
12
+
13
+ border-bottom: 1px solid var(--gray-200);
14
+ content: '';
15
+ display: block;
16
+ position: absolute;
17
+ top: 0;
18
+ width: calc(100% - #{dimensions.get-size(math.div(14, 24))});
19
+ }
20
+
21
+ &:hover,
22
+ &:focus-visible,
23
+ &:first-child {
24
+ &::before {
25
+ border-bottom-color: transparent;
26
+ }
27
+ }
28
+
29
+ &--danger + &::before,
30
+ &--expanded + &::before,
31
+ &:hover + &::before {
32
+ border-color: transparent;
33
+ }
34
+
35
+ &--danger {
36
+ &::before {
37
+ border-bottom-color: transparent;
38
+ }
39
+ }
40
+
41
+ &--expanded {
42
+ &::before {
43
+ border-bottom-color: transparent;
44
+ }
45
+ }
46
+
47
+ &__content {
48
+ flex: 1;
49
+ }
50
+
51
+ &__expand-icon {
52
+ @include motion.transition(transform);
53
+
54
+ position: relative;
55
+
56
+ #{$root}--expanded & {
57
+ transform: scaleY(-1);
58
+ }
59
+ }
60
+
61
+ &__slot {
62
+ .odx-list-item__content {
63
+ @include dimensions.padding(math.div(36, 24), left);
64
+ }
65
+ }
66
+ }
@@ -108,7 +108,7 @@ $form-field-inner-padding: math.div(8, 24);
108
108
  left: 0;
109
109
  position: absolute;
110
110
  width: 100%;
111
- z-index: 1;
111
+ z-index: var(--odx-v-layer-1);
112
112
  }
113
113
 
114
114
  #{$control-selector} {
@@ -15,7 +15,7 @@
15
15
  scroll-behavior: contain;
16
16
  top: 0;
17
17
  width: 100%;
18
- z-index: 1;
18
+ z-index: var(--odx-v-layer-2);
19
19
  }
20
20
 
21
21
  &__backdrop {
@@ -32,7 +32,7 @@
32
32
  position: absolute;
33
33
  top: 50%;
34
34
  transform: translate(-50%, -50%);
35
- z-index: 2;
35
+ z-index: var(--odx-v-layer-3);
36
36
 
37
37
  &__track {
38
38
  stroke: var(--blue-700-15);
@@ -8,13 +8,13 @@
8
8
  @use 'main-menu-item.component';
9
9
 
10
10
  :root {
11
- --odx-main-menu-max-width: 100vw;
11
+ --odx-main-menu-max-width: 100dvw;
12
12
  --odx-main-menu-background-color: var(--odx-c-primary);
13
13
  --odx-main-menu-text-color: var(--odx-c-primary-text);
14
14
  --odx-main-menu-highlight-color: var(--odx-c-highlight);
15
15
 
16
16
  @include breakpoints.up(phone) {
17
- --odx-main-menu-max-width: min(100vw, 384px);
17
+ --odx-main-menu-max-width: min(100dvw, 384px);
18
18
  }
19
19
  }
20
20
 
@@ -29,12 +29,12 @@
29
29
  grid-template-rows: auto auto 1fr auto auto;
30
30
  height: 100%;
31
31
  left: 0;
32
- max-height: 100vh;
32
+ max-height: 100dvh;
33
33
  max-width: var(--odx-main-menu-max-width);
34
34
  position: fixed;
35
35
  top: 0;
36
36
  width: 100%;
37
- z-index: 9000;
37
+ z-index: var(--odx-v-layer-4);
38
38
  }
39
39
 
40
40
  &__overlay {
@@ -45,7 +45,7 @@
45
45
  position: fixed;
46
46
  top: 0;
47
47
  width: 100%;
48
- z-index: 8999;
48
+ z-index: calc(var(--odx-v-layer-4) - 1);
49
49
  }
50
50
 
51
51
  &__actions {
@@ -0,0 +1,80 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+
4
+ .odx-mainfilter-group {
5
+ --odx-input-control-background-color: var(--gray-50);
6
+ --odx-input-control-outline-color: var(--blue-700);
7
+ --odx-c-highlight: var(--blue-700);
8
+ --odx-input-control-outline-color-hover: var(--blue-700);
9
+ --odx-input-control-background-color-hover: var(--gray-100);
10
+ --odx-c-secondary: var(--gray-50);
11
+ --odx-c-secondary-hover: var(--odx-input-control-background-color-hover);
12
+ --odx-c-secondary-active: var(--gray-200);
13
+ --odx-c-focus-outline: var(--cyan-700);
14
+ --odx-c-focus: var(--cyan-50);
15
+ --odx-c-highlight-active: var(--odx-c-focus-outline);
16
+
17
+ .odx-form-field {
18
+ position: relative;
19
+
20
+ &__label {
21
+ margin-top: 0;
22
+ position: absolute;
23
+ right: 0;
24
+ top: dimensions.get-size(math.div(12, 24));
25
+ z-index: 1;
26
+ }
27
+
28
+ &:has(.odx-spinbox) {
29
+ .odx-form-field__label {
30
+ right: dimensions.get-size(math.div(36, 24));
31
+ }
32
+ }
33
+
34
+ &-label {
35
+ @include dimensions.padding-x(math.div(3, 24));
36
+ @include dimensions.padding-y(math.div(2, 24));
37
+
38
+ background-color: var(--odx-input-control-background-color);
39
+ border-radius: var(--odx-v-border-radius-controls);
40
+ display: inline-block;
41
+ font-size: dimensions.get-size(math.div(10, 24));
42
+ line-height: 1;
43
+ }
44
+
45
+ &__hint {
46
+ display: none;
47
+ }
48
+ }
49
+
50
+ .odx-button {
51
+ outline-width: var(--odx-v-outline-width);
52
+
53
+ &:not(:focus-visible) {
54
+ outline-color: var(--odx-input-control-outline-color);
55
+ }
56
+
57
+ &:focus-visible {
58
+ background-color: var(--odx-c-focus);
59
+ }
60
+ }
61
+
62
+ .odx-toggle-button-group {
63
+ margin: 0;
64
+
65
+ &.is-active {
66
+ &:not(.is-disabled, .is-readonly):hover {
67
+ background-color: unset;
68
+ }
69
+
70
+ &:focus-within:has(:focus-visible) {
71
+ background-color: transparent;
72
+ outline-color: transparent;
73
+
74
+ &:hover {
75
+ background-color: transparent;
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
@@ -32,6 +32,7 @@
32
32
  }
33
33
 
34
34
  .odx-action-group {
35
+ align-items: flex-start;
35
36
  display: grid;
36
37
  grid-gap: $grid-gap;
37
38
  grid-template-columns: repeat(3, 1fr);
@@ -43,6 +44,7 @@
43
44
  height: unset;
44
45
  line-height: dimensions.get-size(math.div(20, 24));
45
46
  padding: $grid-gap;
47
+ white-space: unset;
46
48
  width: dimensions.get-size(math.div(100, 24));
47
49
  }
48
50
  }
@@ -16,13 +16,13 @@ $modal-padding: math.div(12, 24);
16
16
  backdrop-filter: blur(var(--odx-v-backdrop-blur));
17
17
  background-color: var(--odx-c-backdrop-dark);
18
18
  display: block;
19
- height: 100%;
19
+ height: 100dvh;
20
20
  left: 0;
21
21
  overscroll-behavior: contain;
22
22
  position: fixed;
23
23
  top: 0;
24
- width: 100%;
25
- z-index: 1000;
24
+ width: 100dvw;
25
+ z-index: var(--odx-v-layer-4);
26
26
 
27
27
  @include breakpoints.up(phone) {
28
28
  --odx-modal-margin-y: #{dimensions.get-size(3)};
@@ -43,9 +43,9 @@ $modal-padding: math.div(12, 24);
43
43
  display: flex;
44
44
  flex-direction: column;
45
45
  margin: var(--odx-modal-margin-y) auto 0;
46
- max-height: calc(100vh - 2 * var(--odx-modal-margin-y));
46
+ max-height: calc(100% - var(--odx-modal-margin-y));
47
47
  min-height: dimensions.get-size(7);
48
- width: min(var(--odx-modal-max-width), calc(100vw - 2 * var(--odx-modal-margin-x)));
48
+ width: min(var(--odx-modal-max-width), calc(100% - 2 * var(--odx-modal-margin-x)));
49
49
 
50
50
  #{$root}--xsmall & {
51
51
  --odx-modal-max-width: #{dimensions.get-size(15)};
@@ -62,12 +62,16 @@ $modal-padding: math.div(12, 24);
62
62
  #{$root}--sidesheet & {
63
63
  height: 100%;
64
64
  left: unset;
65
- max-height: calc(100vh - var(--odx-modal-margin-y) - #{dimensions.get-size(1)});
65
+ max-height: calc(100% - var(--odx-modal-margin-y) - #{dimensions.get-size(0.5)});
66
66
  right: 0;
67
67
 
68
68
  @include breakpoints.up(phone) {
69
69
  margin-right: dimensions.get-size(0.5);
70
70
  }
71
+
72
+ @include breakpoints.down(phone) {
73
+ --odx-modal-max-width: 100dvw !important;
74
+ }
71
75
  }
72
76
 
73
77
  #{$root}--with-component & > * {
@@ -21,8 +21,10 @@
21
21
  width: 100%;
22
22
 
23
23
  #{$root}.is-readonly & {
24
- cursor: text;
25
- user-select: unset;
24
+ #{$root}__value {
25
+ cursor: text;
26
+ user-select: unset;
27
+ }
26
28
  }
27
29
  }
28
30
 
@@ -41,6 +43,10 @@
41
43
 
42
44
  color: var(--odx-input-control-color);
43
45
  opacity: 0.65;
46
+
47
+ #{$root}.is-disabled & {
48
+ color: inherit;
49
+ }
44
50
  }
45
51
 
46
52
  &__search {
@@ -66,7 +66,7 @@
66
66
  top: 0;
67
67
  user-select: none;
68
68
  width: 0;
69
- z-index: 50;
69
+ z-index: var(--odx-v-layer-1);
70
70
 
71
71
  &.is-active {
72
72
  @include dimensions.padding(math.div(8, 24), (right, left));
@@ -29,8 +29,6 @@
29
29
  }
30
30
 
31
31
  &__title {
32
- @include typography.prevent-text-overflow();
33
-
34
32
  font-weight: var(--odx-typography-font-weight-bold);
35
33
  }
36
34
 
@@ -9,13 +9,13 @@
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  margin-top: dimensions.get-size(math.div(4, 24));
12
- max-width: min(calc(100vw - 2 * var(--odx-toast-outer-offset)), dimensions.get-size(20));
12
+ max-width: min(calc(100dvw - 2 * var(--odx-toast-outer-offset)), dimensions.get-size(20));
13
13
  padding-top: var(--odx-toast-outer-offset);
14
14
  position: fixed;
15
15
  right: var(--odx-toast-outer-offset);
16
16
  top: 0;
17
17
  width: 100%;
18
- z-index: 10;
18
+ z-index: var(--odx-v-layer-4);
19
19
 
20
20
  &__counter {
21
21
  align-self: center;
@@ -46,7 +46,7 @@
46
46
 
47
47
  .odx-toggle-button {
48
48
  flex: 1 1 auto;
49
- z-index: 1;
49
+ z-index: var(--odx-v-layer-2);
50
50
  }
51
51
 
52
52
  &.has-error:not(.is-disabled, .is-readonly) {
@@ -28,7 +28,7 @@
28
28
  &-overlay {
29
29
  .odx-cdk-connected-overlay-arrow {
30
30
  background-color: var(--odx-tooltip-background-color);
31
- z-index: -1;
31
+ z-index: var(--odx-v-layer-1);
32
32
  }
33
33
  }
34
34
  }
package/scss/core.scss CHANGED
@@ -33,21 +33,23 @@ Layout
33
33
  @use 'components/breadcrumbs.component';
34
34
  @use 'components/button-group.component';
35
35
  @use 'components/button.component';
36
+ @use 'components/card.component';
36
37
  @use 'components/checkbox.component';
37
38
  @use 'components/chip.component';
38
39
  @use 'components/circular-progress.component';
39
40
  @use 'components/content-box.component';
40
41
  @use 'components/dropdown.component';
42
+ @use 'components/expandable-list-item.component';
41
43
  @use 'components/form-field.component';
42
44
  @use 'components/header.component';
43
45
  @use 'components/icon.component';
44
46
  @use 'components/inline-message.component';
45
- @use 'components/launch-tile.component';
46
47
  @use 'components/link.component';
47
48
  @use 'components/list.component';
48
49
  @use 'components/list-item.component';
49
50
  @use 'components/loading-spinner.component';
50
51
  @use 'components/logo.component';
52
+ @use 'components/mainfilter-group.component';
51
53
  @use 'components/main-menu.component';
52
54
  @use 'components/menu.component';
53
55
  @use 'components/modal.component';
package/scss/reset.scss CHANGED
@@ -5,6 +5,7 @@
5
5
 
6
6
  * {
7
7
  box-sizing: border-box;
8
+ -webkit-tap-highlight-color: transparent;
8
9
 
9
10
  &:focus-visible {
10
11
  outline: none;
@@ -7,6 +7,11 @@
7
7
  --odx-v-box-shadow-layer-1: 0 2px 6px 0 var(--odx-c-box-shadow);
8
8
  --odx-v-box-shadow-layer-2: 0 4px 12px 0 var(--odx-c-box-shadow);
9
9
 
10
+ --odx-v-layer-1: 0;
11
+ --odx-v-layer-2: 10;
12
+ --odx-v-layer-3: 20;
13
+ --odx-v-layer-4: 9000;
14
+
10
15
  --odx-v-transition-duration: 250ms;
11
16
  --odx-v-transition-easing-fn: ease;
12
17
  --odx-v-outline-width: 1px;