@odx/ui 3.2.2 → 3.3.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @odx/ui
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4375380: Add notification component and service
8
+
3
9
  ## 3.2.2
4
10
 
5
11
  ### Patch Changes
package/core-theme.css CHANGED
@@ -5074,6 +5074,107 @@ html body .odx-fs-italic {
5074
5074
  border: none;
5075
5075
  }
5076
5076
 
5077
+ .odx-notification-center-overlay {
5078
+ --odx-cdk-connected-overlay-min-height: calc(var(--odx-vertical-rythm-base-size) * 9);
5079
+ --odx-cdk-connected-overlay-max-height-modified: min(var(--odx-cdk-connected-overlay-max-height), calc(var(--odx-vertical-rythm-base-size) * 18));
5080
+ }
5081
+ .odx-notification-center-overlay .odx-dropdown {
5082
+ --odx-cdk-connected-overlay-max-height: var(--odx-cdk-connected-overlay-max-height-modified);
5083
+ }
5084
+
5085
+ .odx-notification-center {
5086
+ --odx-notification-center-padding-x: calc(var(--odx-vertical-rythm-base-size) * 0.5);
5087
+ --odx-notification-center-padding-y: calc(var(--odx-vertical-rythm-base-size) * 0.5);
5088
+ --odx-notification-center-header-height: calc(var(--odx-vertical-rythm-base-size) * 2);
5089
+ --odx-notification-center-footer-height: calc(var(--odx-vertical-rythm-base-size) * 2.5);
5090
+ background-color: var(--odx-c-background-content);
5091
+ max-height: min(var(--odx-cdk-connected-overlay-max-height), calc(var(--odx-vertical-rythm-base-size) * 15));
5092
+ }
5093
+ .odx-notification-center__header, .odx-notification-center__footer {
5094
+ background-color: inherit;
5095
+ border-radius: var(--odx-v-border-radius);
5096
+ left: 0;
5097
+ margin-right: var(--odx-notification-center-padding-x);
5098
+ padding-left: var(--odx-notification-center-padding-x);
5099
+ position: absolute;
5100
+ right: 0;
5101
+ z-index: 1;
5102
+ }
5103
+ .odx-notification-center__header {
5104
+ border-bottom-left-radius: 0;
5105
+ border-bottom-right-radius: 0;
5106
+ height: var(--odx-notification-center-header-height);
5107
+ line-height: var(--odx-notification-center-header-height);
5108
+ top: 0;
5109
+ -webkit-user-select: none;
5110
+ -moz-user-select: none;
5111
+ user-select: none;
5112
+ font-size: calc(var(--odx-typography-base-size) * 1);
5113
+ font-weight: var(--odx-typography-font-weight-bold);
5114
+ letter-spacing: var(--odx-typography-font-weight-bold-letter-spacing);
5115
+ }
5116
+ .odx-notification-center__content {
5117
+ display: grid;
5118
+ padding-bottom: calc(var(--odx-notification-center-footer-height) - var(--odx-notification-center-padding-y));
5119
+ padding-top: calc(var(--odx-notification-center-header-height) - var(--odx-notification-center-padding-y));
5120
+ }
5121
+ .odx-notification-center__content > .odx-list-item {
5122
+ border-radius: 0;
5123
+ }
5124
+ .odx-notification-center__content > .odx-list-item:first-child {
5125
+ border-top-left-radius: var(--odx-v-border-radius-controls);
5126
+ border-top-right-radius: var(--odx-v-border-radius-controls);
5127
+ }
5128
+ .odx-notification-center__content > .odx-list-item:last-child {
5129
+ border-bottom-left-radius: var(--odx-v-border-radius-controls);
5130
+ border-bottom-right-radius: var(--odx-v-border-radius-controls);
5131
+ }
5132
+ .odx-notification-center__footer {
5133
+ align-items: center;
5134
+ border-top-left-radius: 0;
5135
+ border-top-right-radius: 0;
5136
+ bottom: 0;
5137
+ display: flex;
5138
+ height: var(--odx-notification-center-footer-height);
5139
+ justify-content: flex-end;
5140
+ }
5141
+ .odx-notification-center__footer > .odx-button {
5142
+ margin: 0;
5143
+ }
5144
+
5145
+ .odx-notification-item {
5146
+ -moz-column-gap: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5147
+ column-gap: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5148
+ display: grid;
5149
+ grid-template-areas: "avatar title actions" ". description .";
5150
+ grid-template-columns: auto 1fr auto;
5151
+ grid-template-rows: auto auto;
5152
+ min-width: calc(var(--odx-vertical-rythm-base-size) * 10);
5153
+ padding-right: calc(var(--odx-vertical-rythm-base-size) * 0.25);
5154
+ padding-left: calc(var(--odx-vertical-rythm-base-size) * 0.25);
5155
+ }
5156
+ @media (min-width: 480px) {
5157
+ .odx-notification-item {
5158
+ max-width: calc(var(--odx-vertical-rythm-base-size) * 16);
5159
+ }
5160
+ }
5161
+ .odx-notification-item__title, .odx-notification-item__description {
5162
+ padding-top: calc(var(--odx-vertical-rythm-base-size) * 0);
5163
+ padding-bottom: calc(var(--odx-vertical-rythm-base-size) * 0);
5164
+ line-height: calc(var(--odx-vertical-rythm-base-size) * 1);
5165
+ }
5166
+ .odx-notification-item__title {
5167
+ align-self: center;
5168
+ grid-area: title;
5169
+ }
5170
+ .odx-notification-item__description {
5171
+ grid-area: description;
5172
+ font-size: calc(var(--odx-typography-base-size) * (1*1/var(--odx-typography-negative-font-scaling-factor)*1/var(--odx-typography-negative-font-scaling-factor)));
5173
+ }
5174
+ .odx-notification-item__actions {
5175
+ grid-area: actions;
5176
+ }
5177
+
5077
5178
  .odx-option {
5078
5179
  padding-top: calc(var(--odx-vertical-rythm-base-size) * 0.25);
5079
5180
  padding-bottom: calc(var(--odx-vertical-rythm-base-size) * 0.25);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/ui",
3
- "version": "3.2.2",
3
+ "version": "3.3.0",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -0,0 +1,79 @@
1
+ @use '../abstract/dimensions';
2
+ @use '../abstract/typography';
3
+
4
+ .odx-notification-center-overlay {
5
+ --odx-cdk-connected-overlay-min-height: #{dimensions.get-size(9)};
6
+ --odx-cdk-connected-overlay-max-height-modified: min(var(--odx-cdk-connected-overlay-max-height), #{dimensions.get-size(18)});
7
+
8
+ .odx-dropdown {
9
+ --odx-cdk-connected-overlay-max-height: var(--odx-cdk-connected-overlay-max-height-modified);
10
+ }
11
+ }
12
+
13
+ .odx-notification-center {
14
+ --odx-notification-center-padding-x: #{dimensions.get-size(0.5)};
15
+ --odx-notification-center-padding-y: #{dimensions.get-size(0.5)};
16
+ --odx-notification-center-header-height: #{dimensions.get-size(2)};
17
+ --odx-notification-center-footer-height: #{dimensions.get-size(2.5)};
18
+
19
+ background-color: var(--odx-c-background-content);
20
+ max-height: min(var(--odx-cdk-connected-overlay-max-height), #{dimensions.get-size(15)});
21
+
22
+ &__header,
23
+ &__footer {
24
+ background-color: inherit;
25
+ border-radius: var(--odx-v-border-radius);
26
+ left: 0;
27
+ margin-right: var(--odx-notification-center-padding-x);
28
+ padding-left: var(--odx-notification-center-padding-x);
29
+ position: absolute;
30
+ right: 0;
31
+ z-index: 1;
32
+ }
33
+
34
+ &__header {
35
+ border-bottom-left-radius: 0;
36
+ border-bottom-right-radius: 0;
37
+ height: var(--odx-notification-center-header-height);
38
+ line-height: var(--odx-notification-center-header-height);
39
+ top: 0;
40
+ user-select: none;
41
+
42
+ @include typography.font-size(0);
43
+ @include typography.font-weight(bold);
44
+ }
45
+
46
+ &__content {
47
+ display: grid;
48
+ padding-bottom: calc(var(--odx-notification-center-footer-height) - var(--odx-notification-center-padding-y));
49
+ padding-top: calc(var(--odx-notification-center-header-height) - var(--odx-notification-center-padding-y));
50
+
51
+ > .odx-list-item {
52
+ border-radius: 0;
53
+
54
+ &:first-child {
55
+ border-top-left-radius: var(--odx-v-border-radius-controls);
56
+ border-top-right-radius: var(--odx-v-border-radius-controls);
57
+ }
58
+
59
+ &:last-child {
60
+ border-bottom-left-radius: var(--odx-v-border-radius-controls);
61
+ border-bottom-right-radius: var(--odx-v-border-radius-controls);
62
+ }
63
+ }
64
+ }
65
+
66
+ &__footer {
67
+ align-items: center;
68
+ border-top-left-radius: 0;
69
+ border-top-right-radius: 0;
70
+ bottom: 0;
71
+ display: flex;
72
+ height: var(--odx-notification-center-footer-height);
73
+ justify-content: flex-end;
74
+
75
+ > .odx-button {
76
+ margin: 0;
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,41 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/breakpoints';
3
+ @use '../abstract/dimensions';
4
+ @use '../abstract/typography';
5
+
6
+ .odx-notification-item {
7
+ $root: &;
8
+
9
+ column-gap: dimensions.get-size(math.div(16, 24));
10
+ display: grid;
11
+ grid-template-areas: 'avatar title actions' '. description .';
12
+ grid-template-columns: auto 1fr auto;
13
+ grid-template-rows: auto auto;
14
+ min-width: dimensions.get-size(10);
15
+
16
+ @include dimensions.padding-x(0.25);
17
+
18
+ @include breakpoints.up(phone) {
19
+ max-width: dimensions.get-size(16);
20
+ }
21
+
22
+ &__title,
23
+ &__description {
24
+ @include dimensions.line-height(1);
25
+ }
26
+
27
+ &__title {
28
+ align-self: center;
29
+ grid-area: title;
30
+ }
31
+
32
+ &__description {
33
+ grid-area: description;
34
+
35
+ @include typography.font-size(-2);
36
+ }
37
+
38
+ &__actions {
39
+ grid-area: actions;
40
+ }
41
+ }
package/scss/core.scss CHANGED
@@ -66,6 +66,8 @@ Layout
66
66
  @use 'components/menu.component';
67
67
  @use 'components/modal.component';
68
68
  @use 'components/navigation-back.component';
69
+ @use 'components/notification-center.component';
70
+ @use 'components/notification-item.component';
69
71
  @use 'components/option.component';
70
72
  @use 'components/progress.component';
71
73
  @use 'components/radio-button.component';