@odx/ui 3.0.0 → 3.2.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,34 @@
1
1
  # @odx/ui
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3ebfb3c: Add brand-logo component which can be used to display the ODX brand logo
8
+
9
+ ### Patch Changes
10
+
11
+ - c357174: Use CSS only icons for breadcrumb separator icons
12
+ - 753c400: Add missing odx-v-layer-6 CSS variable
13
+
14
+ ## 3.1.0
15
+
16
+ ### Minor Changes
17
+
18
+ - e9ca1be: Added `muted` state to list item component
19
+
20
+ ### Patch Changes
21
+
22
+ - c618486: Fixed z-layer stacking issues
23
+
24
+ Fixed over position calculation by using CSS variables
25
+
26
+ WithTabIndex directive now applies tabindex correctly
27
+
28
+ Fixed various linting errors
29
+
30
+ - a62275c: Reduce buffer size of used `shareReplay` operators in order to reduce runtime memory consumption
31
+
3
32
  ## 3.0.0
4
33
 
5
34
  ### Major Changes
package/core-theme.css CHANGED
@@ -312,6 +312,7 @@
312
312
  }
313
313
 
314
314
  :root {
315
+ --odx-v-max-page-width: 1440px;
315
316
  --odx-v-border-radius: calc(var(--odx-typography-base-size) * 0.375);
316
317
  --odx-v-border-radius-controls: calc(var(--odx-typography-base-size) * 0.19);
317
318
  --odx-v-backdrop-blur: 3px;
@@ -322,6 +323,7 @@
322
323
  --odx-v-layer-3: 20;
323
324
  --odx-v-layer-4: 9000;
324
325
  --odx-v-layer-5: 9500;
326
+ --odx-v-layer-6: 9900;
325
327
  --odx-v-transition-duration: 250ms;
326
328
  --odx-v-transition-easing-fn: ease;
327
329
  --odx-v-outline-width: 1px;
@@ -2068,11 +2070,15 @@ html body .odx-fs-italic {
2068
2070
  }
2069
2071
  .odx-cdk-connected-overlay__content {
2070
2072
  left: 0 !important;
2073
+ max-height: var(--odx-cdk-connected-overlay-max-height-modified, var(--odx-cdk-connected-overlay-max-height, unset));
2074
+ max-width: var(--odx-cdk-connected-overlay-max-width-modified, var(--odx-cdk-connected-overlay-max-width, unset));
2075
+ min-height: var(--odx-cdk-connected-overlay-min-height-modified, var(--odx-cdk-connected-overlay-min-height, unset));
2076
+ min-width: var(--odx-cdk-connected-overlay-min-width-modified, var(--odx-cdk-connected-overlay-min-width, unset));
2071
2077
  position: relative !important;
2072
2078
  top: 0 !important;
2073
2079
  }
2074
2080
  .odx-cdk-connected-overlay__content > * {
2075
- max-height: inherit;
2081
+ max-height: var(--odx-cdk-connected-overlay-max-height, inherit);
2076
2082
  }
2077
2083
 
2078
2084
  .odx-cdk-connected-overlay-arrow {
@@ -2330,15 +2336,15 @@ html body .odx-fs-italic {
2330
2336
  border-radius: var(--odx-v-border-radius);
2331
2337
  box-shadow: var(--odx-v-box-shadow-layer-1);
2332
2338
  display: block;
2333
- min-height: inherit;
2339
+ min-height: var(--odx-cdk-connected-overlay-min-height, inherit);
2334
2340
  }
2335
2341
  .odx-dropdown__inner {
2336
2342
  padding-right: calc(var(--odx-vertical-rythm-base-size) * 0.5);
2337
2343
  padding-left: calc(var(--odx-vertical-rythm-base-size) * 0.5);
2338
2344
  border-bottom: calc(var(--odx-vertical-rythm-base-size) * 0.5) solid transparent;
2339
2345
  border-top: calc(var(--odx-vertical-rythm-base-size) * 0.5) solid transparent;
2340
- max-height: inherit;
2341
- min-height: inherit;
2346
+ max-height: var(--odx-cdk-connected-overlay-max-height, inherit);
2347
+ min-height: var(--odx-cdk-connected-overlay-min-height, inherit);
2342
2348
  overflow: auto;
2343
2349
  overscroll-behavior: contain;
2344
2350
  }
@@ -2917,20 +2923,29 @@ html body .odx-fs-italic {
2917
2923
  flex-wrap: wrap;
2918
2924
  gap: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
2919
2925
  }
2920
- .odx-breadcrumbs .odx-link:last-child {
2921
- font-weight: var(--odx-typography-font-weight-bold);
2922
- letter-spacing: var(--odx-typography-font-weight-bold-letter-spacing);
2923
- color: var(--odx-c-text);
2926
+ .odx-breadcrumbs .odx-link {
2927
+ white-space: nowrap;
2924
2928
  }
2925
- .odx-breadcrumbs .odx-link:visited {
2926
- color: var(--odx-c-link);
2929
+ .odx-breadcrumbs .odx-link:not(:last-child) {
2930
+ margin-right: calc(var(--odx-vertical-rythm-base-size) * 0.8334);
2927
2931
  }
2928
- .odx-breadcrumbs .odx-icon {
2932
+ .odx-breadcrumbs .odx-link:not(:last-child)::after {
2929
2933
  color: var(--gray-500);
2934
+ content: "\f158";
2935
+ display: inline-block;
2936
+ font-family: "core-icons";
2930
2937
  font-size: calc(var(--odx-vertical-rythm-base-size) * 0.5);
2938
+ pointer-events: none;
2939
+ position: absolute;
2940
+ margin-left: calc(var(--odx-vertical-rythm-base-size) * 0.5);
2931
2941
  }
2932
- .odx-breadcrumbs .odx-icon::before {
2933
- position: unset;
2942
+ .odx-breadcrumbs .odx-link:visited {
2943
+ color: var(--odx-c-link);
2944
+ }
2945
+ .odx-breadcrumbs .odx-link:last-child, .odx-breadcrumbs .odx-link:last-child:visited {
2946
+ font-weight: var(--odx-typography-font-weight-bold);
2947
+ letter-spacing: var(--odx-typography-font-weight-bold-letter-spacing);
2948
+ color: var(--odx-c-text);
2934
2949
  }
2935
2950
 
2936
2951
  .odx-button-group {
@@ -3020,6 +3035,20 @@ html body .odx-fs-italic {
3020
3035
  border-radius: 0;
3021
3036
  }
3022
3037
 
3038
+ .odx-brand-logo {
3039
+ color: var(--odx-c-text);
3040
+ display: inline-block;
3041
+ font-weight: var(--odx-typography-font-weight-bold);
3042
+ letter-spacing: var(--odx-typography-font-weight-bold-letter-spacing);
3043
+ }
3044
+ .odx-brand-logo::before {
3045
+ color: var(--odx-c-highlight);
3046
+ content: "O";
3047
+ }
3048
+ .odx-brand-logo::after {
3049
+ content: "DX";
3050
+ }
3051
+
3023
3052
  :root {
3024
3053
  --odx-card-avatar-size: 64px;
3025
3054
  --odx-card-content-vertical-alignment: center;
@@ -4087,12 +4116,12 @@ html body .odx-fs-italic {
4087
4116
  margin-right: calc(var(--odx-vertical-rythm-base-size) * 0.5);
4088
4117
  padding-right: calc(var(--odx-vertical-rythm-base-size) * 0.5);
4089
4118
  }
4090
- .odx-header:has(.odx-title, .odx-header__title) > .odx-logo {
4119
+ .odx-header:has(> .odx-title, > .odx-header__title) > .odx-logo {
4091
4120
  display: none;
4092
4121
  margin-right: calc(var(--odx-vertical-rythm-base-size) * 0.5);
4093
4122
  }
4094
4123
  @media (min-width: 768px) {
4095
- .odx-header:has(.odx-title, .odx-header__title) > .odx-logo {
4124
+ .odx-header:has(> .odx-title, > .odx-header__title) > .odx-logo {
4096
4125
  display: block;
4097
4126
  }
4098
4127
  }
@@ -4303,8 +4332,11 @@ html body .odx-fs-italic {
4303
4332
  .odx-list-item > [odxListItemSuffix] {
4304
4333
  margin-left: auto;
4305
4334
  }
4306
- .odx-list-item:not(.is-disabled) {
4307
- cursor: pointer;
4335
+ .odx-list-item.odx-list-item--muted {
4336
+ cursor: default;
4337
+ -webkit-user-select: text;
4338
+ -moz-user-select: text;
4339
+ user-select: text;
4308
4340
  }
4309
4341
  .odx-list-item::before {
4310
4342
  transition-delay: 0ms;
@@ -4319,16 +4351,16 @@ html body .odx-fs-italic {
4319
4351
  top: 0;
4320
4352
  width: calc(100% - calc(var(--odx-vertical-rythm-base-size) * 0.6667));
4321
4353
  }
4322
- .odx-list-item:focus-visible {
4354
+ .odx-list-item:focus-visible:not(.odx-list-item--muted) {
4323
4355
  --separator-color: transparent !important;
4324
4356
  }
4325
4357
  @media (hover: hover){
4326
- .odx-list-item:hover {
4358
+ .odx-list-item:hover:not(.odx-list-item--muted) {
4327
4359
  --separator-color: transparent !important;
4328
4360
  }
4329
4361
  }
4330
4362
  @media (hover: hover){
4331
- .odx-list-item:hover {
4363
+ .odx-list-item:hover:not(.odx-list-item--muted) {
4332
4364
  background-color: var(--odx-c-ghost-hover);
4333
4365
  }
4334
4366
  }
@@ -4336,7 +4368,7 @@ html body .odx-fs-italic {
4336
4368
  --separator-color: transparent !important;
4337
4369
  }
4338
4370
  @media (hover: hover){
4339
- .odx-list-item:hover+.odx-list-item {
4371
+ .odx-list-item:hover:not(.odx-list-item--muted)+.odx-list-item {
4340
4372
  --separator-color: transparent !important;
4341
4373
  }
4342
4374
  }
@@ -4351,7 +4383,7 @@ html body .odx-fs-italic {
4351
4383
  color: var(--odx-c-danger-text);
4352
4384
  }
4353
4385
  @media (hover: hover){
4354
- .odx-list-item--danger:hover {
4386
+ .odx-list-item--danger:hover:not(.odx-list-item--muted) {
4355
4387
  background-color: var(--odx-c-danger-hover);
4356
4388
  }
4357
4389
  }
@@ -4363,7 +4395,7 @@ html body .odx-fs-italic {
4363
4395
  background-color: var(--odx-c-selected);
4364
4396
  }
4365
4397
  @media (hover: hover){
4366
- .odx-list-item.is-selected:hover {
4398
+ .odx-list-item.is-selected:hover:not(.odx-list-item--muted) {
4367
4399
  background-color: var(--odx-c-selected-hover);
4368
4400
  }
4369
4401
  }
@@ -4371,7 +4403,7 @@ html body .odx-fs-italic {
4371
4403
  background-color: var(--odx-c-danger-active);
4372
4404
  }
4373
4405
  @media (hover: hover){
4374
- .odx-list-item.is-selected.odx-list-item--danger:hover {
4406
+ .odx-list-item.is-selected.odx-list-item--danger:hover:not(.odx-list-item--muted) {
4375
4407
  background-color: var(--red-800);
4376
4408
  }
4377
4409
  }
@@ -4690,7 +4722,7 @@ html body .odx-fs-italic {
4690
4722
  .odx-main-menu {
4691
4723
  --odx-area-header-title-color: var(--odx-main-menu-highlight-color);
4692
4724
  --odx-area-header-subtitle-color: var(--odx-c-text-inverse);
4693
- z-index: var(--odx-v-layer-5);
4725
+ z-index: var(--odx-v-layer-6);
4694
4726
  }
4695
4727
  .odx-main-menu__inner {
4696
4728
  background-color: var(--odx-main-menu-background-color);
@@ -4850,7 +4882,7 @@ html body .odx-fs-italic {
4850
4882
  position: fixed;
4851
4883
  top: 0;
4852
4884
  width: 100dvw;
4853
- z-index: var(--odx-v-layer-4);
4885
+ z-index: var(--odx-v-layer-5);
4854
4886
  }
4855
4887
  @media (min-width: 480px) {
4856
4888
  .odx-modal {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/ui",
3
- "version": "3.0.0",
3
+ "version": "3.2.0",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -22,11 +22,15 @@
22
22
 
23
23
  &__content {
24
24
  left: 0 !important;
25
+ max-height: var(--odx-cdk-connected-overlay-max-height-modified, var(--odx-cdk-connected-overlay-max-height, unset));
26
+ max-width: var(--odx-cdk-connected-overlay-max-width-modified, var(--odx-cdk-connected-overlay-max-width, unset));
27
+ min-height: var(--odx-cdk-connected-overlay-min-height-modified, var(--odx-cdk-connected-overlay-min-height, unset));
28
+ min-width: var(--odx-cdk-connected-overlay-min-width-modified, var(--odx-cdk-connected-overlay-min-width, unset));
25
29
  position: relative !important;
26
30
  top: 0 !important;
27
31
 
28
32
  > * {
29
- max-height: inherit;
33
+ max-height: var(--odx-cdk-connected-overlay-max-height, inherit);
30
34
  }
31
35
  }
32
36
  }
@@ -0,0 +1,17 @@
1
+ @use '../abstract/typography';
2
+
3
+ .odx-brand-logo {
4
+ color: var(--odx-c-text);
5
+ display: inline-block;
6
+
7
+ @include typography.font-weight(bold);
8
+
9
+ &::before {
10
+ color: var(--odx-c-highlight);
11
+ content: 'O';
12
+ }
13
+
14
+ &::after {
15
+ content: 'DX';
16
+ }
17
+ }
@@ -2,6 +2,7 @@
2
2
  @use '../abstract/dimensions';
3
3
  @use '../abstract/utils';
4
4
  @use '../abstract/typography';
5
+ @use '@odx/icons/core/core-utils' as icons;
5
6
 
6
7
  .odx-breadcrumbs {
7
8
  @include dimensions.padding-x(1);
@@ -12,23 +13,33 @@
12
13
  gap: dimensions.get-size(math.div(8, 24));
13
14
 
14
15
  .odx-link {
15
- &:last-child {
16
- @include typography.font-weight(bold);
16
+ white-space: nowrap;
17
17
 
18
- color: var(--odx-c-text);
18
+ &:not(:last-child) {
19
+ @include dimensions.margin(math.div(20, 24), right);
20
+
21
+ &::after {
22
+ color: var(--gray-500);
23
+ content: icons.get-icon-glyph('chevron-right');
24
+ display: inline-block;
25
+ font-family: icons.get-font-family();
26
+ font-size: dimensions.get-size(math.div(12, 24));
27
+ pointer-events: none;
28
+ position: absolute;
29
+
30
+ @include dimensions.margin(math.div(12, 24), left);
31
+ }
19
32
  }
20
33
 
21
34
  &:visited {
22
35
  color: var(--odx-c-link);
23
36
  }
24
- }
25
37
 
26
- .odx-icon {
27
- color: var(--gray-500);
28
- font-size: dimensions.get-size(math.div(12, 24));
38
+ &:last-child,
39
+ &:last-child:visited {
40
+ @include typography.font-weight(bold);
29
41
 
30
- &::before {
31
- position: unset;
42
+ color: var(--odx-c-text);
32
43
  }
33
44
  }
34
45
  }
@@ -8,15 +8,15 @@ $dropdown-open-selector: '.odx-dropdown-host[aria-expanded="true"]';
8
8
  border-radius: var(--odx-v-border-radius);
9
9
  box-shadow: var(--odx-v-box-shadow-layer-1);
10
10
  display: block;
11
- min-height: inherit;
11
+ min-height: var(--odx-cdk-connected-overlay-min-height, inherit);
12
12
 
13
13
  &__inner {
14
14
  @include dimensions.padding-x(0.5);
15
15
 
16
16
  border-bottom: dimensions.get-size(0.5) solid transparent;
17
17
  border-top: dimensions.get-size(0.5) solid transparent;
18
- max-height: inherit;
19
- min-height: inherit;
18
+ max-height: var(--odx-cdk-connected-overlay-max-height, inherit);
19
+ min-height: var(--odx-cdk-connected-overlay-min-height, inherit);
20
20
  overflow: auto;
21
21
  overscroll-behavior: contain;
22
22
  }
@@ -35,7 +35,7 @@
35
35
  padding-right: dimensions.get-size(0.5);
36
36
  }
37
37
 
38
- &:has(.odx-title) > .odx-logo {
38
+ &:has(> .odx-title) > .odx-logo {
39
39
  display: none;
40
40
  margin-right: dimensions.get-size(0.5);
41
41
 
@@ -6,6 +6,7 @@
6
6
 
7
7
  .odx-list-item {
8
8
  $root: &;
9
+ $muted-selector: #{$root}--muted;
9
10
 
10
11
  --separator-color: var(--odx-c-separator);
11
12
 
@@ -26,8 +27,9 @@
26
27
  margin-left: auto;
27
28
  }
28
29
 
29
- &:not(.is-disabled) {
30
- cursor: pointer;
30
+ &#{$muted-selector} {
31
+ cursor: default;
32
+ user-select: text;
31
33
  }
32
34
 
33
35
  &::before {
@@ -44,16 +46,18 @@
44
46
 
45
47
  &:hover,
46
48
  &:focus-visible {
47
- --separator-color: transparent !important;
49
+ &:not(#{$muted-selector}) {
50
+ --separator-color: transparent !important;
51
+ }
48
52
  }
49
53
 
50
- &:hover {
54
+ &:hover:not(#{$muted-selector}) {
51
55
  background-color: var(--odx-c-ghost-hover);
52
56
  }
53
57
 
54
58
  &--danger + &,
55
59
  &.is-selected + &,
56
- &:hover + & {
60
+ &:hover:not(#{$muted-selector}) + & {
57
61
  --separator-color: transparent !important;
58
62
  }
59
63
 
@@ -69,7 +73,7 @@
69
73
  background-color: var(--odx-c-danger);
70
74
  color: var(--odx-c-danger-text);
71
75
 
72
- &:hover {
76
+ &:hover:not(#{$muted-selector}) {
73
77
  background-color: var(--odx-c-danger-hover);
74
78
  }
75
79
 
@@ -83,14 +87,14 @@
83
87
 
84
88
  background-color: var(--odx-c-selected);
85
89
 
86
- &:hover {
90
+ &:hover:not(#{$muted-selector}) {
87
91
  background-color: var(--odx-c-selected-hover);
88
92
  }
89
93
 
90
94
  &#{$root}--danger {
91
95
  background-color: var(--odx-c-danger-active);
92
96
 
93
- &:hover {
97
+ &:hover:not(#{$muted-selector}) {
94
98
  background-color: var(--red-800);
95
99
  }
96
100
 
@@ -28,7 +28,7 @@
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);
31
+ z-index: var(--odx-v-layer-6);
32
32
 
33
33
  &__inner {
34
34
  background-color: var(--odx-main-menu-background-color);
@@ -23,7 +23,7 @@ $modal-padding: math.div(12, 24);
23
23
  position: fixed;
24
24
  top: 0;
25
25
  width: 100dvw;
26
- z-index: var(--odx-v-layer-4);
26
+ z-index: var(--odx-v-layer-5);
27
27
 
28
28
  @include breakpoints.up(phone) {
29
29
  --odx-modal-margin-y: #{dimensions.get-size(3)};
package/scss/core.scss CHANGED
@@ -40,6 +40,7 @@ Layout
40
40
  @use 'components/breadcrumbs.component';
41
41
  @use 'components/button-group.component';
42
42
  @use 'components/button.component';
43
+ @use 'components/brand-logo.component';
43
44
  @use 'components/card.component';
44
45
  @use 'components/calendar.component';
45
46
  @use 'components/checkbox.component';
@@ -1,4 +1,5 @@
1
1
  :root {
2
+ --odx-v-max-page-width: 1440px;
2
3
  --odx-v-border-radius: calc(var(--odx-typography-base-size) * 0.375);
3
4
  --odx-v-border-radius-controls: calc(var(--odx-typography-base-size) * 0.19);
4
5
 
@@ -12,6 +13,7 @@
12
13
  --odx-v-layer-3: 20;
13
14
  --odx-v-layer-4: 9000;
14
15
  --odx-v-layer-5: 9500;
16
+ --odx-v-layer-6: 9900;
15
17
 
16
18
  --odx-v-transition-duration: 250ms;
17
19
  --odx-v-transition-easing-fn: ease;