@odx/ui 1.0.0-rc.6 → 1.0.0-rc.8

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.6",
3
+ "version": "1.0.0-rc.8",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "files": [
@@ -0,0 +1,36 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/typography';
5
+ @use '../abstract/utils';
6
+
7
+ .odx-cdk-connected-overlay {
8
+ @include motion.transition(opacity visibility);
9
+
10
+ display: block;
11
+ position: fixed;
12
+ z-index: 1337;
13
+
14
+ &.is-hidden {
15
+ opacity: 0;
16
+ visibility: hidden;
17
+ }
18
+
19
+ &__content {
20
+ left: 0 !important;
21
+ position: relative !important;
22
+ top: 0 !important;
23
+
24
+ > * {
25
+ max-height: inherit;
26
+ }
27
+ }
28
+ }
29
+
30
+ .odx-cdk-connected-overlay-arrow {
31
+ height: dimensions.get-size(0.5);
32
+ position: fixed;
33
+ transform: rotate(45deg);
34
+ width: dimensions.get-size(0.5);
35
+ z-index: 0;
36
+ }
@@ -0,0 +1,26 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+
4
+ .odx-dropdown {
5
+ background-color: var(--odx-c-background-content);
6
+ border-radius: var(--odx-v-border-radius);
7
+ box-shadow: var(--odx-v-backdrop-box-shadow-layer-2);
8
+ display: block;
9
+ min-height: inherit;
10
+
11
+ &__inner {
12
+ @include dimensions.padding-x(0.5);
13
+
14
+ border-bottom: dimensions.get-size(0.5) solid transparent;
15
+ border-top: dimensions.get-size(0.5) solid transparent;
16
+ max-height: inherit;
17
+ min-height: inherit;
18
+ overflow: auto;
19
+ }
20
+ }
21
+
22
+ .odx-dropdown-overlay {
23
+ .odx-cdk-connected-overlay-arrow {
24
+ background-color: var(--odx-c-background-content);
25
+ }
26
+ }
@@ -0,0 +1,33 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/typography';
4
+
5
+ .odx-inline-message {
6
+ --odx-c-default: var(--blue-50);
7
+ --odx-c-warning: var(--yellow-50);
8
+ --odx-c-danger: var(--red-00);
9
+ --odx-c-success: var(--green-00);
10
+
11
+ $variants: default, warning, danger, success;
12
+
13
+ @include dimensions.padding(math.div(10, 24));
14
+
15
+ display: flex;
16
+ gap: dimensions.get-size(math.div(10, 24));
17
+
18
+ @each $variant in $variants {
19
+ &--#{$variant} {
20
+ background-color: var(--odx-c-#{$variant});
21
+ }
22
+ }
23
+
24
+ &--danger {
25
+ color: var(--red-700);
26
+ }
27
+
28
+ &__content {
29
+ @include typography.font-size(-1);
30
+
31
+ overflow: hidden;
32
+ }
33
+ }
@@ -0,0 +1,118 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/breakpoints';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/utils';
5
+ @use '../abstract/dimensions';
6
+
7
+ // TODO: check distances
8
+
9
+ .odx-launch-tile {
10
+ $root: &;
11
+ $main-padding: dimensions.get-size(math.div(12, 24));
12
+
13
+ @include motion.transition(box-shadow outline-color);
14
+ @include utils.interactive(false);
15
+ @include utils.with-outline-bold();
16
+
17
+ background-color: var(--odx-c-background-content);
18
+ border-radius: var(--odx-v-border-radius);
19
+ display: block;
20
+ padding: $main-padding;
21
+ position: relative;
22
+
23
+ &:focus-visible,
24
+ &:hover,
25
+ &:focus-within:has(:focus-visible) {
26
+ box-shadow: var(--odx-v-backdrop-box-shadow-layer-1);
27
+ }
28
+
29
+ &__container {
30
+ @include dimensions.padding-x(math.div(8, 24));
31
+ @include dimensions.padding-y(0.5);
32
+
33
+ display: flex;
34
+ gap: dimensions.get-size(math.div(16, 24));
35
+
36
+ @include breakpoints.up(phone) {
37
+ @include dimensions.padding(1, bottom);
38
+
39
+ flex-direction: column;
40
+ gap: dimensions.get-size(math.div(8, 24));
41
+ }
42
+ }
43
+
44
+ &__content {
45
+ flex: 1;
46
+ padding-right: dimensions.get-size(math.div(40, 24));
47
+
48
+ @include breakpoints.up(phone) {
49
+ padding-right: unset;
50
+ text-align: center;
51
+ }
52
+ }
53
+
54
+ &__title {
55
+ @include dimensions.margin-y(math.div(9, 24));
56
+
57
+ font-size: dimensions.get-size(math.div(20, 24));
58
+ font-weight: var(--odx-typography-font-weight-medium);
59
+ line-height: dimensions.get-size(math.div(30, 24));
60
+ }
61
+
62
+ &__subtitle {
63
+ color: var(--gray-500);
64
+ }
65
+
66
+ &__title,
67
+ &__subtitle {
68
+ @include motion.transition(color);
69
+
70
+ display: block;
71
+
72
+ #{$root}.is-disabled & {
73
+ color: var(--odx-c-text-disabled);
74
+ }
75
+ }
76
+
77
+ &__footer {
78
+ display: flex;
79
+ gap: dimensions.get-size(math.div(12, 24));
80
+ justify-content: flex-end;
81
+
82
+ @include breakpoints.up(phone) {
83
+ justify-content: center;
84
+ padding-bottom: dimensions.get-size(math.div(12, 24));
85
+ }
86
+
87
+ .odx-button {
88
+ margin: 0;
89
+ }
90
+ }
91
+
92
+ .odx-action-group {
93
+ margin: 0;
94
+ position: absolute;
95
+ right: $main-padding;
96
+ top: $main-padding;
97
+ }
98
+
99
+ .odx-avatar {
100
+ @include dimensions.container(math.div(64, 24));
101
+ @include dimensions.margin-y(math.div(4, 24));
102
+
103
+ flex: 0 0 auto;
104
+
105
+ @include breakpoints.up(phone) {
106
+ @include dimensions.container(math.div(128, 24));
107
+
108
+ margin: dimensions.get-size(math.div(4, 24)) auto 0;
109
+ }
110
+ }
111
+
112
+ &.is-disabled {
113
+ .odx-avatar {
114
+ color: var(--odx-c-text-disabled);
115
+ filter: saturate(0);
116
+ }
117
+ }
118
+ }
@@ -13,6 +13,7 @@
13
13
  @include utils.interactive(false);
14
14
  @include utils.vertical-center-content();
15
15
 
16
+ background-color: transparent;
16
17
  border-radius: var(--odx-v-border-radius-controls);
17
18
  gap: dimensions.get-size(math.div(1, 3));
18
19
  position: relative;
@@ -48,6 +48,7 @@
48
48
  }
49
49
 
50
50
  &-parent {
51
+ overflow: hidden;
51
52
  user-select: none;
52
53
  }
53
54
  }
@@ -0,0 +1,107 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/typography';
5
+ @use '../abstract/utils';
6
+
7
+ :root {
8
+ --odx-select-max-height: 220px;
9
+ }
10
+
11
+ .odx-select {
12
+ $root: &;
13
+
14
+ &__trigger {
15
+ @include utils.vertical-center-content();
16
+
17
+ cursor: pointer;
18
+ flex: 1 1 100%;
19
+ gap: dimensions.get-size(math.div(6, 24));
20
+ height: 100%;
21
+ width: 100%;
22
+
23
+ #{$root}.is-readonly & {
24
+ cursor: text;
25
+ user-select: unset;
26
+ }
27
+ }
28
+
29
+ &__placeholder,
30
+ &__value {
31
+ @include dimensions.padding-y(math.div(4, 24));
32
+ @include typography.prevent-text-overflow();
33
+
34
+ flex: 1 1 auto;
35
+ gap: dimensions.get-size(math.div(4, 24));
36
+ user-select: none;
37
+ }
38
+
39
+ &__placeholder {
40
+ @include typography.font-weight(normal);
41
+
42
+ color: var(--odx-input-control-color);
43
+ opacity: 0.65;
44
+ }
45
+
46
+ &__search {
47
+ height: 100%;
48
+ outline: inherit;
49
+ padding: 0 !important;
50
+ }
51
+
52
+ &__indicator {
53
+ @include motion.transition(transform opacity);
54
+ @include dimensions.margin(math.div(-2, 24), right);
55
+
56
+ margin-left: auto;
57
+
58
+ #{$root}.is-open & {
59
+ transform: rotateX(180deg);
60
+ }
61
+
62
+ #{$root}.is-readonly & {
63
+ opacity: 0;
64
+ }
65
+ }
66
+ }
67
+
68
+ .odx-select-dropdown {
69
+ display: flex;
70
+ flex-direction: column;
71
+ max-height: var(--odx-select-max-height);
72
+ min-height: dimensions.get-size(1.5);
73
+ }
74
+
75
+ .odx-option {
76
+ @include dimensions.line-height(1.5, 1);
77
+ @include dimensions.margin(math.div(4, 24), bottom);
78
+ @include dimensions.padding-x(0.5);
79
+ @include motion.transition(background-color color outline-color);
80
+ @include typography.font-weight(normal);
81
+
82
+ border-radius: var(--odx-v-border-radius-controls);
83
+ cursor: pointer;
84
+ user-select: none;
85
+
86
+ &:last-child {
87
+ margin-bottom: 0;
88
+ }
89
+
90
+ &.is-active,
91
+ &:hover {
92
+ background-color: var(--gray-50);
93
+ }
94
+
95
+ &.is-selected {
96
+ background-color: var(--cyan-500-15);
97
+ }
98
+
99
+ &.is-disabled {
100
+ color: var(--odx-control-color-disabled);
101
+ pointer-events: none;
102
+ }
103
+
104
+ > .odx-checkbox {
105
+ @include dimensions.margin(math.div(8, 24), right);
106
+ }
107
+ }
@@ -0,0 +1,124 @@
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-form-field__control:has(.odx-spinbox) {
9
+ background-color: transparent !important;
10
+ outline-color: transparent !important;
11
+
12
+ .odx-form-field-control {
13
+ padding: 0;
14
+ }
15
+
16
+ &::after {
17
+ content: none;
18
+ }
19
+
20
+ &.has-error & {
21
+ background-color: transparent;
22
+ outline-color: transparent;
23
+
24
+ &:hover {
25
+ background-color: transparent;
26
+ }
27
+ }
28
+ }
29
+
30
+ .odx-spinbox {
31
+ $root: &;
32
+
33
+ align-items: stretch;
34
+ display: flex;
35
+ flex: 1;
36
+ gap: 1px;
37
+
38
+ &__input {
39
+ @include typography.font-weight(medium);
40
+ @include dimensions.padding-x(math.div(8, 24));
41
+
42
+ appearance: textfield;
43
+ text-align: center;
44
+ width: 100%;
45
+
46
+ &::placeholder {
47
+ @include typography.font-weight(normal);
48
+
49
+ color: var(--odx-input-control-color);
50
+ opacity: 0.65;
51
+ }
52
+
53
+ &::-webkit-inner-spin-button {
54
+ appearance: none;
55
+ }
56
+ }
57
+
58
+ &__input,
59
+ &__action {
60
+ @include motion.transition(background-color border-color color);
61
+
62
+ background-color: var(--odx-input-control-background-color);
63
+ border: 1px solid var(--odx-input-control-outline-color);
64
+
65
+ #{$root}.has-error & {
66
+ background-color: var(--odx-input-control-background-color-error);
67
+ border-color: var(--odx-input-control-outline-color-error) !important;
68
+ }
69
+
70
+ #{$root} &:hover {
71
+ background-color: var(--odx-input-control-background-color-hover);
72
+ border-color: var(--odx-input-control-outline-color-hover);
73
+ }
74
+
75
+ #{$root} &:active {
76
+ background-color: var(--odx-input-control-outline-color-hover);
77
+ border-color: var(--odx-input-control-outline-color-hover);
78
+ }
79
+
80
+ #{$root}.is-readonly & {
81
+ background-color: var(--odx-input-control-outline-color-disabled);
82
+ border-color: var(--odx-input-control-outline-color-readonly) !important;
83
+ }
84
+
85
+ #{$root} &:focus-visible {
86
+ background-color: var(--odx-c-focus);
87
+ border-color: var(--odx-c-focus-outline) !important;
88
+ }
89
+
90
+ #{$root}.is-disabled & {
91
+ @include utils.non-interactive();
92
+
93
+ background-color: var(--odx-input-control-background-color-disabled);
94
+ border-color: var(--odx-input-control-outline-color-disabled) !important;
95
+ color: var(--odx-input-control-color-disabled);
96
+ }
97
+ }
98
+
99
+ &__action {
100
+ border-radius: var(--odx-v-border-radius-controls);
101
+ flex: 0 0 dimensions.get-size(math.div(36, 24));
102
+ height: 100%;
103
+ margin: 0;
104
+ outline: none;
105
+
106
+ &:first-child {
107
+ border-bottom-right-radius: 0;
108
+ border-right: unset;
109
+ border-top-right-radius: 0;
110
+ }
111
+
112
+ &:last-child {
113
+ border-bottom-left-radius: 0;
114
+ border-left: unset;
115
+ border-top-left-radius: 0;
116
+ }
117
+
118
+ #{$root}.is-readonly & {
119
+ @include utils.non-interactive();
120
+
121
+ color: var(--odx-input-control-color-disabled);
122
+ }
123
+ }
124
+ }
@@ -0,0 +1,53 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/typography';
5
+ @use '../abstract//utils';
6
+
7
+ .odx-tab-bar-item {
8
+ @include dimensions.height(2, math.div(32, 24));
9
+ @include dimensions.padding-x(math.div(4, 24));
10
+ @include utils.vertical-center-content();
11
+ @include utils.with-outline;
12
+ @include motion.transition(background-color outline-color);
13
+
14
+ align-items: center;
15
+ background-color: transparent;
16
+ border-radius: var(--odx-v-border-radius-controls);
17
+ cursor: pointer;
18
+ user-select: none;
19
+
20
+ &:hover {
21
+ background-color: var(--blue-700-5);
22
+ }
23
+
24
+ .odx-icon {
25
+ @include dimensions.container(1, 1);
26
+ @include dimensions.margin-x(math.div(4, 24));
27
+
28
+ font-size: dimensions.get-size(1);
29
+
30
+ &:first-child {
31
+ margin-left: 0;
32
+ }
33
+
34
+ &:last-child:not(:first-child) {
35
+ @include motion.transition(color);
36
+
37
+ margin-right: 0;
38
+
39
+ &:hover {
40
+ color: var(--odx-c-highlight);
41
+ }
42
+ }
43
+ }
44
+
45
+ &.is-disabled {
46
+ color: var(--odx-c-text-disabled);
47
+ pointer-events: none;
48
+
49
+ .odx-tab-bar-item__label {
50
+ pointer-events: none;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,124 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/utils';
5
+
6
+ .odx-tab-bar {
7
+ $root: &;
8
+
9
+ @include dimensions.height(2);
10
+
11
+ border-bottom: 1px solid;
12
+ border-bottom-color: var(--odx-control-outline-color-hover);
13
+ display: flex;
14
+ overflow: hidden;
15
+ position: relative;
16
+
17
+ &__inner {
18
+ $gradient-start: dimensions.get-size(1);
19
+ $gradient-end: dimensions.get-size(3);
20
+ $mask-color: #000000;
21
+
22
+ display: flex;
23
+ width: 100%;
24
+
25
+ #{$root}--overflow-left & {
26
+ mask-image: linear-gradient(to right, transparent $gradient-start, $mask-color $gradient-end);
27
+ }
28
+
29
+ #{$root}--overflow-right & {
30
+ mask-image: linear-gradient(to right, $mask-color calc(100% - $gradient-end), transparent calc(100% - $gradient-start));
31
+ }
32
+
33
+ #{$root}--overflow-left#{$root}--overflow-right & {
34
+ mask-image: linear-gradient(
35
+ to right,
36
+ transparent $gradient-start,
37
+ $mask-color $gradient-end,
38
+ $mask-color calc(100% - $gradient-end),
39
+ transparent calc(100% - $gradient-start)
40
+ );
41
+ }
42
+ }
43
+
44
+ &__panel {
45
+ @include motion.transition(transform);
46
+ @include dimensions.padding-x(math.div(12, 24));
47
+
48
+ display: flex;
49
+ flex: 0 0 auto;
50
+ gap: dimensions.get-size(math.div(8, 24));
51
+ position: relative;
52
+ }
53
+
54
+ &__action {
55
+ @include dimensions.height(2);
56
+ @include motion.transition(opacity width padding);
57
+ @include utils.center-content();
58
+
59
+ background-color: transparent;
60
+ cursor: pointer;
61
+ opacity: 0;
62
+ overflow: hidden;
63
+ padding: 0;
64
+ pointer-events: none;
65
+ position: absolute;
66
+ top: 0;
67
+ user-select: none;
68
+ width: 0;
69
+ z-index: 50;
70
+
71
+ &.is-active {
72
+ @include dimensions.padding(math.div(8, 24), (right, left));
73
+
74
+ opacity: 1;
75
+ pointer-events: all;
76
+ transform: scaleX(1);
77
+ width: dimensions.get-size(1.5);
78
+ }
79
+
80
+ .odx-icon {
81
+ @include dimensions.container(1, 1);
82
+
83
+ align-items: center;
84
+ color: var(--odx-c-highlight);
85
+ display: flex;
86
+ font-size: dimensions.get-size(math.div(32, 24));
87
+ justify-content: center;
88
+ }
89
+
90
+ &--prev {
91
+ justify-content: flex-start;
92
+ left: 0;
93
+ transform-origin: center left;
94
+ }
95
+
96
+ &--next {
97
+ justify-content: flex-end;
98
+ right: 0;
99
+ transform-origin: center right;
100
+ }
101
+
102
+ &:hover {
103
+ .odx-icon {
104
+ color: var(--odx-c-highlight-hover);
105
+ }
106
+ }
107
+ }
108
+
109
+ .odx-tab-bar__indicator {
110
+ @include dimensions.margin(math.div(8, 24), left);
111
+
112
+ background-color: var(--odx-c-highlight);
113
+ bottom: 0;
114
+ height: dimensions.get-size(math.div(4, 24));
115
+ width: dimensions.get-size(2) !important;
116
+ }
117
+
118
+ &:focus-visible {
119
+ .odx-tab-bar-item.is-active {
120
+ background-color: var(--odx-c-focus);
121
+ outline-color: var(--odx-c-focus-outline);
122
+ }
123
+ }
124
+ }
@@ -0,0 +1,34 @@
1
+ @use '../abstract/dimensions';
2
+
3
+ :root {
4
+ --odx-tooltip-background-color: var(--blue-800);
5
+ --odx-tooltip-color: var(--odx-c-text-inverse);
6
+ --odx-tooltip-size-small: #{dimensions.get-size(5)};
7
+ --odx-tooltip-size-medium: #{dimensions.get-size(10)};
8
+ --odx-tooltip-size-large: #{dimensions.get-size(15)};
9
+ }
10
+
11
+ .odx-tooltip {
12
+ $sizes: small, medium, large;
13
+
14
+ @include dimensions.padding(0.5);
15
+
16
+ background-color: var(--odx-tooltip-background-color);
17
+ border-radius: var(--odx-v-border-radius);
18
+ color: var(--odx-tooltip-color);
19
+ display: block;
20
+ overflow: hidden;
21
+
22
+ @each $size in $sizes {
23
+ &--#{$size} {
24
+ max-width: var(--odx-tooltip-size-#{$size});
25
+ }
26
+ }
27
+
28
+ &-overlay {
29
+ .odx-cdk-connected-overlay-arrow {
30
+ background-color: var(--odx-tooltip-background-color);
31
+ z-index: -1;
32
+ }
33
+ }
34
+ }