@odx/ui 3.7.0 → 3.8.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,11 +1,21 @@
1
1
  # @odx/ui
2
2
 
3
+ ## 3.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 172ecd3: ODX Modal & Sidesheet now uses native HTML Dialog under the hood
8
+
3
9
  ## 3.7.0
4
10
 
5
11
  ### Minor Changes
6
12
 
7
13
  - 8d72579: Added headline classes styling
8
14
 
15
+ ### Patch Changes
16
+
17
+ - 288bb39: Responsive attribute for wizard component
18
+
9
19
  ## 3.6.0
10
20
 
11
21
  ### Minor Changes
package/core-theme.css CHANGED
@@ -5182,73 +5182,85 @@ html body .odx-fs-italic {
5182
5182
  width: calc(var(--odx-vertical-rythm-base-size) * 4.1667);
5183
5183
  }
5184
5184
 
5185
+ @keyframes basic-fade-out {
5186
+ from {
5187
+ opacity: 1;
5188
+ }
5189
+ to {
5190
+ opacity: 0;
5191
+ }
5192
+ }
5185
5193
  .odx-modal {
5186
5194
  --odx-modal-margin-y: calc(var(--odx-vertical-rythm-base-size) * 2);
5187
5195
  --odx-modal-margin-x: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
5188
5196
  --odx-modal-max-width: calc(var(--odx-vertical-rythm-base-size) * 20);
5189
5197
  --odx-modal-margin-bottom: calc(var(--odx-vertical-rythm-base-size) * 0.5);
5198
+ background: transparent;
5199
+ border: 0;
5200
+ border-radius: var(--odx-v-border-radius);
5201
+ box-shadow: var(--odx-v-box-shadow-layer-2);
5202
+ color: var(--odx-c-text);
5203
+ margin-top: var(--odx-modal-margin-y);
5204
+ overflow: unset;
5205
+ padding: 0;
5206
+ width: min(var(--odx-modal-max-width), 100% - 2 * var(--odx-modal-margin-x));
5207
+ }
5208
+ .odx-modal:modal {
5209
+ max-height: calc(100% - var(--odx-modal-margin-y) - var(--odx-modal-margin-bottom));
5210
+ max-width: 100vw;
5211
+ }
5212
+ .odx-modal::backdrop {
5190
5213
  -webkit-backdrop-filter: blur(var(--odx-v-backdrop-blur));
5191
5214
  backdrop-filter: blur(var(--odx-v-backdrop-blur));
5192
5215
  background-color: var(--odx-c-backdrop-dark);
5193
- display: block;
5194
- height: 100dvh;
5195
- left: 0;
5196
- overscroll-behavior: contain;
5197
- position: fixed;
5198
- top: 0;
5199
- width: 100dvw;
5200
- z-index: var(--odx-v-layer-4);
5201
- }
5202
- @media (min-width: 480px) {
5203
- .odx-modal {
5204
- --odx-modal-margin-y: calc(var(--odx-vertical-rythm-base-size) * 3);
5205
- --odx-modal-margin-x: calc(var(--odx-vertical-rythm-base-size) * 1);
5206
- --odx-modal-margin-bottom: calc(var(--odx-vertical-rythm-base-size) * 1);
5207
- }
5208
- }
5209
- .odx-modal--sidesheet {
5210
- -webkit-backdrop-filter: unset;
5211
- backdrop-filter: unset;
5212
- background-color: unset;
5213
5216
  }
5214
- .odx-modal__container {
5215
- padding-right: calc(var(--odx-vertical-rythm-base-size) * 1);
5216
- padding-left: calc(var(--odx-vertical-rythm-base-size) * 1);
5217
- background-color: var(--odx-c-background-content);
5218
- border-radius: var(--odx-v-border-radius);
5219
- box-shadow: var(--odx-v-box-shadow-layer-2);
5220
- display: flex;
5221
- flex-direction: column;
5222
- margin: var(--odx-modal-margin-y) auto 0;
5223
- max-height: calc(100% - var(--odx-modal-margin-y) - var(--odx-modal-margin-bottom));
5224
- min-height: calc(var(--odx-vertical-rythm-base-size) * 7);
5225
- width: min(var(--odx-modal-max-width), 100% - 2 * var(--odx-modal-margin-x));
5217
+ .odx-modal[data-closing-animation]::backdrop {
5218
+ animation: basic-fade-out 0.3s;
5226
5219
  }
5227
- .odx-modal--xsmall .odx-modal__container {
5220
+ .odx-modal.odx-modal--xsmall {
5228
5221
  --odx-modal-max-width: calc(var(--odx-vertical-rythm-base-size) * 15);
5229
5222
  }
5230
- .odx-modal--medium .odx-modal__container {
5223
+ .odx-modal.odx-modal--medium {
5231
5224
  --odx-modal-max-width: calc(var(--odx-vertical-rythm-base-size) * 30);
5232
5225
  }
5233
- .odx-modal--large .odx-modal__container {
5226
+ .odx-modal.odx-modal--large {
5234
5227
  --odx-modal-max-width: calc(var(--odx-vertical-rythm-base-size) * 50);
5235
5228
  }
5236
- .odx-modal--sidesheet .odx-modal__container {
5229
+ .odx-modal--sidesheet {
5237
5230
  height: 100%;
5238
- left: unset;
5239
5231
  max-height: calc(100% - var(--odx-modal-margin-y) - var(--odx-modal-margin-bottom));
5240
- right: 0;
5232
+ }
5233
+ .odx-modal--sidesheet::backdrop {
5234
+ -webkit-backdrop-filter: unset;
5235
+ backdrop-filter: unset;
5236
+ background-color: unset;
5241
5237
  }
5242
5238
  @media (min-width: 480px) {
5243
- .odx-modal--sidesheet .odx-modal__container {
5239
+ .odx-modal--sidesheet {
5244
5240
  margin-right: calc(var(--odx-vertical-rythm-base-size) * 0.5);
5245
5241
  }
5246
5242
  }
5247
5243
  @media (max-width: 479px) {
5248
- .odx-modal--sidesheet .odx-modal__container {
5244
+ .odx-modal--sidesheet {
5249
5245
  --odx-modal-max-width: 100dvw !important;
5250
5246
  }
5251
5247
  }
5248
+ @media (min-width: 480px) {
5249
+ .odx-modal {
5250
+ --odx-modal-margin-y: calc(var(--odx-vertical-rythm-base-size) * 3);
5251
+ --odx-modal-margin-x: calc(var(--odx-vertical-rythm-base-size) * 1);
5252
+ --odx-modal-margin-bottom: calc(var(--odx-vertical-rythm-base-size) * 1);
5253
+ }
5254
+ }
5255
+ .odx-modal__container {
5256
+ padding-right: calc(var(--odx-vertical-rythm-base-size) * 1);
5257
+ padding-left: calc(var(--odx-vertical-rythm-base-size) * 1);
5258
+ background-color: var(--odx-c-background-content);
5259
+ border-radius: var(--odx-v-border-radius);
5260
+ display: flex;
5261
+ flex-direction: column;
5262
+ height: 100%;
5263
+ }
5252
5264
  .odx-modal--with-component .odx-modal__container > * {
5253
5265
  display: contents;
5254
5266
  }
@@ -6973,15 +6985,15 @@ html body .odx-fs-italic {
6973
6985
  }
6974
6986
 
6975
6987
  .odx-wizard {
6976
- --odx-horizontal-wizzard-width: calc(var(--odx-vertical-rythm-base-size) * 4.1667);
6977
- --odx-vertical-wizzard-heigth: calc(var(--odx-vertical-rythm-base-size) * 2.9167);
6988
+ --odx-horizontal-wizard-width: calc(var(--odx-vertical-rythm-base-size) * 4.1667);
6989
+ --odx-vertical-wizard-height: calc(var(--odx-vertical-rythm-base-size) * 2.9167);
6978
6990
  display: flex;
6979
6991
  }
6980
6992
  .odx-wizard--vertical {
6981
6993
  flex-direction: column;
6982
6994
  }
6983
6995
  .odx-wizard--overflow:not(.odx-wizard--vertical) {
6984
- min-width: calc(var(--odx-horizontal-wizzard-width) * 7);
6996
+ min-width: calc(var(--odx-horizontal-wizard-width) * 7);
6985
6997
  }
6986
6998
 
6987
6999
  .odx-wizard-step {
@@ -6993,7 +7005,7 @@ html body .odx-fs-italic {
6993
7005
  }
6994
7006
  .odx-wizard:not(.odx-wizard--vertical) .odx-wizard-step {
6995
7007
  gap: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
6996
- min-width: var(--odx-horizontal-wizzard-width);
7008
+ min-width: var(--odx-horizontal-wizard-width);
6997
7009
  }
6998
7010
  .odx-wizard-step.is-disabled {
6999
7011
  outline-color: transparent;
@@ -7061,12 +7073,12 @@ html body .odx-fs-italic {
7061
7073
  border-style: dashed;
7062
7074
  height: 0;
7063
7075
  margin-bottom: calc(calc(var(--odx-vertical-rythm-base-size) * 0.8334) / 2 - calc(var(--odx-vertical-rythm-base-size) * 0.0834) / 2);
7064
- min-width: var(--odx-horizontal-wizzard-width);
7076
+ min-width: var(--odx-horizontal-wizard-width);
7065
7077
  }
7066
7078
  .odx-wizard.odx-wizard--vertical .odx-wizard-step__dotted-line {
7067
7079
  border-style: dashed;
7068
7080
  margin-left: calc(calc(var(--odx-vertical-rythm-base-size) * 0.8334) / 2 - calc(var(--odx-vertical-rythm-base-size) * 0.0834) / 2);
7069
- padding-bottom: var(--odx-verticalal-wizzard-heigth);
7081
+ padding-bottom: var(--odx-vertical-wizard-height);
7070
7082
  }
7071
7083
  .odx-wizard.odx-wizard--vertical .odx-wizard-step:first-of-type + .odx-wizard-step__dotted-line {
7072
7084
  border-left-color: var(--odx-c-primary);
@@ -7166,7 +7178,7 @@ html body .odx-fs-italic {
7166
7178
  }
7167
7179
  .odx-wizard--vertical .odx-wizard-step {
7168
7180
  align-items: center;
7169
- flex: 0 0 var(--odx-vertical-wizzard-heigth);
7181
+ flex: 0 0 var(--odx-vertical-wizard-height);
7170
7182
  flex-direction: row-reverse;
7171
7183
  gap: calc(var(--odx-vertical-rythm-base-size) * 0.5);
7172
7184
  justify-content: start;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/ui",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -4,6 +4,16 @@
4
4
  @use '../abstract/typography';
5
5
  @use '../abstract/utils';
6
6
 
7
+ @keyframes basic-fade-out {
8
+ from {
9
+ opacity: 1;
10
+ }
11
+
12
+ to {
13
+ opacity: 0;
14
+ }
15
+ }
16
+
7
17
  $modal-padding: math.div(12, 24);
8
18
 
9
19
  .odx-modal {
@@ -14,67 +24,74 @@ $modal-padding: math.div(12, 24);
14
24
 
15
25
  $root: &;
16
26
 
17
- backdrop-filter: blur(var(--odx-v-backdrop-blur));
18
- background-color: var(--odx-c-backdrop-dark);
19
- display: block;
20
- height: 100dvh;
21
- left: 0;
22
- overscroll-behavior: contain;
23
- position: fixed;
24
- top: 0;
25
- width: 100dvw;
26
- z-index: var(--odx-v-layer-4);
27
+ background: transparent;
28
+ border: 0;
29
+ border-radius: var(--odx-v-border-radius);
30
+ box-shadow: var(--odx-v-box-shadow-layer-2);
31
+ color: var(--odx-c-text);
32
+ margin-top: var(--odx-modal-margin-y);
33
+ overflow: unset;
34
+ padding: 0;
35
+ width: min(var(--odx-modal-max-width), calc(100% - 2 * var(--odx-modal-margin-x)));
36
+
37
+ &:modal {
38
+ max-height: calc(100% - var(--odx-modal-margin-y) - var(--odx-modal-margin-bottom));
39
+ max-width: 100vw;
40
+ }
27
41
 
28
- @include breakpoints.up(phone) {
29
- --odx-modal-margin-y: #{dimensions.get-size(3)};
30
- --odx-modal-margin-x: #{dimensions.get-size(1)};
31
- --odx-modal-margin-bottom: #{dimensions.get-size(1)};
42
+ &::backdrop {
43
+ backdrop-filter: blur(var(--odx-v-backdrop-blur));
44
+ background-color: var(--odx-c-backdrop-dark);
32
45
  }
33
46
 
34
- &--sidesheet {
35
- backdrop-filter: unset;
36
- background-color: unset;
47
+ &[data-closing-animation]::backdrop {
48
+ animation: basic-fade-out 0.3s;
37
49
  }
38
50
 
39
- &__container {
40
- @include dimensions.padding-x(1);
51
+ &.odx-modal--xsmall {
52
+ --odx-modal-max-width: #{dimensions.get-size(15)};
53
+ }
41
54
 
42
- background-color: var(--odx-c-background-content);
43
- border-radius: var(--odx-v-border-radius);
44
- box-shadow: var(--odx-v-box-shadow-layer-2);
45
- display: flex;
46
- flex-direction: column;
47
- margin: var(--odx-modal-margin-y) auto 0;
55
+ &.odx-modal--medium {
56
+ --odx-modal-max-width: #{dimensions.get-size(30)};
57
+ }
58
+
59
+ &.odx-modal--large {
60
+ --odx-modal-max-width: #{dimensions.get-size(50)};
61
+ }
62
+
63
+ &--sidesheet {
64
+ height: 100%;
48
65
  max-height: calc(100% - var(--odx-modal-margin-y) - var(--odx-modal-margin-bottom));
49
- min-height: dimensions.get-size(7);
50
- width: min(var(--odx-modal-max-width), calc(100% - 2 * var(--odx-modal-margin-x)));
51
66
 
52
- #{$root}--xsmall & {
53
- --odx-modal-max-width: #{dimensions.get-size(15)};
67
+ &::backdrop {
68
+ backdrop-filter: unset;
69
+ background-color: unset;
54
70
  }
55
71
 
56
- #{$root}--medium & {
57
- --odx-modal-max-width: #{dimensions.get-size(30)};
72
+ @include breakpoints.up(phone) {
73
+ margin-right: dimensions.get-size(0.5);
58
74
  }
59
75
 
60
- #{$root}--large & {
61
- --odx-modal-max-width: #{dimensions.get-size(50)};
76
+ @include breakpoints.down(phone) {
77
+ --odx-modal-max-width: 100dvw !important;
62
78
  }
79
+ }
63
80
 
64
- #{$root}--sidesheet & {
65
- height: 100%;
66
- left: unset;
67
- max-height: calc(100% - var(--odx-modal-margin-y) - var(--odx-modal-margin-bottom));
68
- right: 0;
81
+ @include breakpoints.up(phone) {
82
+ --odx-modal-margin-y: #{dimensions.get-size(3)};
83
+ --odx-modal-margin-x: #{dimensions.get-size(1)};
84
+ --odx-modal-margin-bottom: #{dimensions.get-size(1)};
85
+ }
69
86
 
70
- @include breakpoints.up(phone) {
71
- margin-right: dimensions.get-size(0.5);
72
- }
87
+ &__container {
88
+ @include dimensions.padding-x(1);
73
89
 
74
- @include breakpoints.down(phone) {
75
- --odx-modal-max-width: 100dvw !important;
76
- }
77
- }
90
+ background-color: var(--odx-c-background-content);
91
+ border-radius: var(--odx-v-border-radius);
92
+ display: flex;
93
+ flex-direction: column;
94
+ height: 100%;
78
95
 
79
96
  #{$root}--with-component & > * {
80
97
  display: contents;
@@ -20,7 +20,7 @@
20
20
 
21
21
  .#{$parent-root}:not(.#{$parent-root}--vertical) & {
22
22
  gap: dimensions.get-size(math.div(8, 24));
23
- min-width: var(--odx-horizontal-wizzard-width);
23
+ min-width: var(--odx-horizontal-wizard-width);
24
24
  }
25
25
 
26
26
  &.is-disabled {
@@ -95,13 +95,13 @@
95
95
  border-style: dashed;
96
96
  height: 0;
97
97
  margin-bottom: calc(#{$step-size} / 2 - #{$border-width} / 2);
98
- min-width: var(--odx-horizontal-wizzard-width);
98
+ min-width: var(--odx-horizontal-wizard-width);
99
99
  }
100
100
 
101
101
  .#{$parent-root}.#{$parent-root}--vertical & {
102
102
  border-style: dashed;
103
103
  margin-left: calc(#{$step-size} / 2 - #{$border-width} / 2);
104
- padding-bottom: var(--odx-verticalal-wizzard-heigth);
104
+ padding-bottom: var(--odx-vertical-wizard-height);
105
105
  }
106
106
 
107
107
  #{$root}:first-of-type + & {
@@ -248,7 +248,7 @@
248
248
 
249
249
  .#{$parent-root}--vertical & {
250
250
  align-items: center;
251
- flex: 0 0 var(--odx-vertical-wizzard-heigth);
251
+ flex: 0 0 var(--odx-vertical-wizard-height);
252
252
  flex-direction: row-reverse;
253
253
  gap: dimensions.get-size(math.div(12, 24));
254
254
  justify-content: start;
@@ -3,8 +3,8 @@
3
3
  @use '../abstract/breakpoints';
4
4
 
5
5
  .odx-wizard {
6
- --odx-horizontal-wizzard-width: #{dimensions.get-size(math.div(100, 24))};
7
- --odx-vertical-wizzard-heigth: #{dimensions.get-size(math.div(70, 24))};
6
+ --odx-horizontal-wizard-width: #{dimensions.get-size(math.div(100, 24))};
7
+ --odx-vertical-wizard-height: #{dimensions.get-size(math.div(70, 24))};
8
8
 
9
9
  display: flex;
10
10
 
@@ -13,6 +13,6 @@
13
13
  }
14
14
 
15
15
  &--overflow:not(&--vertical) {
16
- min-width: calc(var(--odx-horizontal-wizzard-width) * 7);
16
+ min-width: calc(var(--odx-horizontal-wizard-width) * 7);
17
17
  }
18
18
  }