@odx/ui 3.2.1 → 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 +13 -0
- package/core-theme.css +123 -2
- package/package.json +1 -1
- package/scss/components/button.component.scss +20 -0
- package/scss/components/notification-center.component.scss +79 -0
- package/scss/components/notification-item.component.scss +41 -0
- package/scss/components/rich-list-item.component.scss +6 -1
- package/scss/core.scss +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @odx/ui
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4375380: Add notification component and service
|
|
8
|
+
|
|
9
|
+
## 3.2.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 3eb8c54: Large variant for button component
|
|
14
|
+
- b3993a0: New condensed variant to rich-list component to set vrtical padding to 0 for list items
|
|
15
|
+
|
|
3
16
|
## 3.2.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/core-theme.css
CHANGED
|
@@ -2635,6 +2635,24 @@ html body .odx-fs-italic {
|
|
|
2635
2635
|
.odx-button--small > .odx-icon[alignRight] {
|
|
2636
2636
|
margin-left: calc(var(--odx-vertical-rythm-base-size) * 0.125);
|
|
2637
2637
|
}
|
|
2638
|
+
.odx-button--large {
|
|
2639
|
+
margin-top: calc(var(--odx-vertical-rythm-base-size) * 0);
|
|
2640
|
+
margin-bottom: calc(var(--odx-vertical-rythm-base-size) * 0);
|
|
2641
|
+
height: calc(var(--odx-vertical-rythm-base-size) * 2);
|
|
2642
|
+
padding-right: calc(var(--odx-vertical-rythm-base-size) * 1);
|
|
2643
|
+
padding-left: calc(var(--odx-vertical-rythm-base-size) * 1);
|
|
2644
|
+
font-size: calc(var(--odx-typography-base-size) * (1*var(--odx-typography-positive-font-scaling-factor)));
|
|
2645
|
+
}
|
|
2646
|
+
.odx-button--large > .odx-icon {
|
|
2647
|
+
margin-right: calc(var(--odx-vertical-rythm-base-size) * -0.3333);
|
|
2648
|
+
margin-left: calc(var(--odx-vertical-rythm-base-size) * -0.3333);
|
|
2649
|
+
}
|
|
2650
|
+
.odx-button--large > .odx-icon[alignLeft] {
|
|
2651
|
+
margin-right: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
|
|
2652
|
+
}
|
|
2653
|
+
.odx-button--large > .odx-icon[alignRight] {
|
|
2654
|
+
margin-left: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
|
|
2655
|
+
}
|
|
2638
2656
|
|
|
2639
2657
|
.odx-action-group {
|
|
2640
2658
|
margin-top: calc(var(--odx-vertical-rythm-base-size) * 0.25);
|
|
@@ -5056,6 +5074,107 @@ html body .odx-fs-italic {
|
|
|
5056
5074
|
border: none;
|
|
5057
5075
|
}
|
|
5058
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
|
+
|
|
5059
5178
|
.odx-option {
|
|
5060
5179
|
padding-top: calc(var(--odx-vertical-rythm-base-size) * 0.25);
|
|
5061
5180
|
padding-bottom: calc(var(--odx-vertical-rythm-base-size) * 0.25);
|
|
@@ -5475,13 +5594,15 @@ html body .odx-fs-italic {
|
|
|
5475
5594
|
}
|
|
5476
5595
|
|
|
5477
5596
|
.odx-rich-list-item {
|
|
5478
|
-
padding-top: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
|
|
5479
5597
|
padding-right: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
|
|
5480
|
-
padding-bottom: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
|
|
5481
5598
|
padding-left: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
|
|
5482
5599
|
border-bottom: 1px solid var(--odx-input-control-outline-color);
|
|
5483
5600
|
display: block;
|
|
5484
5601
|
}
|
|
5602
|
+
.odx-rich-list:not(.odx-rich-list--condensed) > .odx-rich-list-item {
|
|
5603
|
+
padding-top: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
|
|
5604
|
+
padding-bottom: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
|
|
5605
|
+
}
|
|
5485
5606
|
.odx-rich-list-item.is-disabled .odx-rich-list-item-header__title,
|
|
5486
5607
|
.odx-rich-list-item.is-disabled .odx-rich-list-item-header .odx-avatar {
|
|
5487
5608
|
color: var(--odx-c-text-disabled);
|
package/package.json
CHANGED
|
@@ -147,4 +147,24 @@
|
|
|
147
147
|
@include dimensions.margin($icon-margin, left);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
+
|
|
151
|
+
&--large {
|
|
152
|
+
$icon-margin: 0.5;
|
|
153
|
+
|
|
154
|
+
@include dimensions.height(2, 2);
|
|
155
|
+
@include dimensions.padding-x(2 * $icon-margin);
|
|
156
|
+
@include typography.font-size(1);
|
|
157
|
+
|
|
158
|
+
> .odx-icon {
|
|
159
|
+
@include dimensions.margin-x(-$icon-margin * math.div(2, 3));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
> .odx-icon[alignLeft] {
|
|
163
|
+
@include dimensions.margin($icon-margin * math.div(2, 3), right);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
> .odx-icon[alignRight] {
|
|
167
|
+
@include dimensions.margin($icon-margin * math.div(2, 3), left);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
150
170
|
}
|
|
@@ -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
|
+
}
|
|
@@ -6,8 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
.odx-rich-list-item {
|
|
8
8
|
$root: &;
|
|
9
|
+
$parent: odx-rich-list;
|
|
9
10
|
|
|
10
|
-
@include dimensions.padding(math.div(8, 24));
|
|
11
|
+
@include dimensions.padding-x(math.div(8, 24));
|
|
12
|
+
|
|
13
|
+
.#{$parent}:not(.#{$parent}--condensed) > & {
|
|
14
|
+
@include dimensions.padding-y(math.div(8, 24));
|
|
15
|
+
}
|
|
11
16
|
|
|
12
17
|
border-bottom: 1px solid var(--odx-input-control-outline-color);
|
|
13
18
|
display: block;
|
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';
|